﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.Input.JJFlow;
using Jinjia.Approve.Model.VM.JJFlow;
using Jinjia.Core.BaseInfrastructure.StorageModel.Model;

namespace Jinjia.Approve.IRepository.JJFlow
{
    public interface IFlowTemplateRepository
    {
        Task<jj_flow_template> GetById(int id);

        Task<int> Save(jj_flow_template data);

        Task<List<jj_flow_template>> GetExistTemplateByName(string name, int id);

        Task<PageListSearchResultVM<JJTemplateViewModel>> GetTemplatePageList(JJTemplateSearchCondition searchCondition, int user_id);

        /// <summary>
        /// 获取模板头信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<JJTemplateSignleViewModel> GetTemplateDetail(int id);

        Task LogicalDelete(int id, int user_id);

        Task<int> GetTemplateId(string system_key, string big_modular_key, string modular_key);
    }
}